<html>
<head><meta charset="utf-8"><title>All source code is stored in RAM twice · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/All.20source.20code.20is.20stored.20in.20RAM.20twice.html">All source code is stored in RAM twice</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="202799957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/All%20source%20code%20is%20stored%20in%20RAM%20twice/near/202799957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/All.20source.20code.20is.20stored.20in.20RAM.20twice.html#202799957">(Jul 03 2020 at 12:46)</a>:</h4>
<p>I'm doing some more memory profiling and noticed that all source code (in r-a's case, 43 MB) is stored in memory twice, once in the VFS and once, I think, as the Salsa DB inputs. Does that sound right? Any ideas for deduplicating them?</p>



<a name="202802114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/All%20source%20code%20is%20stored%20in%20RAM%20twice/near/202802114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/All.20source.20code.20is.20stored.20in.20RAM.20twice.html#202802114">(Jul 03 2020 at 13:10)</a>:</h4>
<p><a href="https://github.com/salsa-rs/salsa/blob/37b3c054fe364892ac4c5d0a1fe85c6b47156946/src/interned.rs#L370-L383">https://github.com/salsa-rs/salsa/blob/37b3c054fe364892ac4c5d0a1fe85c6b47156946/src/interned.rs#L370-L383</a> &lt;- bit about interned queries</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>